package com.example.testpulsar.mq.runner;

import com.example.testpulsar.mq.messagepojo.Msg;
import com.example.testpulsar.mq.sender.MqMessageSender;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class ProducerThread implements Runnable{

    @Resource(name = "wxgzhHistoryListAcqSender")
    MqMessageSender messageSender;

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            messageSender.send(new Msg("张三"+i,"zhangSan"+i,"123456"));
        }
    }

}
